<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<style>
    body {
        padding: 50px;
    }
    
    .mydiv {
        height: 200px;
        width: 200px;
        border: 1px solid #ccc;
        margin-bottom: 20px;
        display: inline-block;
        margin-right: 20px;
    }
    
    .case1 {
      background: rgba(100, 100, 50, .1);
      box-shadow: 2px 3px 4px rgba(0,0,0,.5);
    }
    /*单侧投影*/
    .case2 {
      box-shadow: 0 5px 4px -4px black;
    }
    /*邻边投影*/
    .case3 {
      box-shadow: 3px 3px 6px -3px black;
    }
    /*双侧投影*/
    .case4 {
      box-shadow: 5px 0 5px -5px black,
-5px 0 5px -5px black;
    }
</style>

<body>
    <div class="mydiv case1"></div>
    <div class="mydiv case2"></div>
    <div class="mydiv case3"></div>
    <div class="mydiv case4"></div>
</body>

</html>